<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="949.54">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #0000ff}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #001fe8}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
span.s1 {font: 18.0px Helvetica}
span.s2 {color: #000000}
span.s3 {color: #0022f8}
span.s4 {text-decoration: underline}
span.s5 {text-decoration: underline ; color: #0030f2}
span.s6 {color: #0024b5}
span.Apple-tab-span {white-space:pre}
</style>
</head>
<body>
<p class="p1"><span class="s1"><b>Nes2DMC</b></span><b><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>wrapper class for the Nes2 UGen</b></p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p3"><span class="s2">requires my <a href="../Bit/BitOr.html"><span class="s3">BitOr</span></a> plugin.<span class="Apple-converted-space">  </span>available at </span><span class="s4">http://www.fredrikolofsson.com/pages/code-sc.html</span></p>
<p class="p2"><br></p>
<p class="p1">simplifies the interface for the [<a href="Nes2.html"><span class="s5">Nes2</span></a>] ugen a little.<span class="Apple-converted-space">  </span>provides standard ranges with clipping for all inputs.<span class="Apple-converted-space">  </span>no need to deal with bitwise register calculations, though note that this class is a bit less cpu efficient than to use the standard Nes2.</p>
<p class="p4"><span class="s2">see also [<a href="Nes2Triangle.html"><span class="s4">Nes2Triangle</span></a>], [<a href="Nes2Square.html"><span class="s4">Nes2Square</span></a>], [<a href="Nes2Noise.html"><span class="s4">Nes2Noise</span></a>]</span></p>
<p class="p2"><br></p>
<p class="p1"><b><span class="Apple-tab-span">	</span>*ar(trig, loop, freq)</b></p>
<p class="p1"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>trig - control or audio rate trigger</p>
<p class="p1"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>loop - looping off or on 0/1</p>
<p class="p1"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>freq - frequency 0-15</p>
<p class="p2"><br></p>
<p class="p1">note that all functionality is not implemented, but it can still be somewhat (mis)used.</p>
<p class="p2"><br></p>
<p class="p5">s.boot</p>
<p class="p5">{<span class="s6">Nes2DMC</span>.ar(<span class="s6">Impulse</span>.kr(4), <span class="s6">MouseX</span>.kr(0, 1), <span class="s6">MouseY</span>.kr(0, 15))}.play</p>
<p class="p6"><br></p>
<p class="p5">{<span class="s6">Nes2DMC</span>.ar(<span class="s6">Impulse</span>.kr(10), 1, <span class="s6">SinOsc</span>.kr([<span class="s6">SinOsc</span>.kr(0.05, pi, 0.5, 1.5).round, 1], 0, 7.5, 7.5).round(<span class="s6">SinOsc</span>.kr(0.19, 0, 2.5, 2.5)))}.play</p>
</body>
</html>
